import api from "../utils/api";

export default {
    getTaskInfo:(date)=>{
        return api({
            url:"/task/v2/currentIndexInfo",
            method:"POST",
            body:{
                currentDate:date.getTime() 
            }
        })
    },
    create:(task)=>{
        return api({
            url:"/task/v2/create",
            method:"POST",
            body:task
        });
    },
    remove:(id)=>{
        return api({
            url:`/task//v2/deleteMain?taskId=${id}`,
            method:"POST"
        })
    },
    deleteToday:(id,date)=>{
        return api({
            url:`/task/deleteToday`,
            method:"POST",
            body:{
                taskId:id,
                currentDate:date.getTime()
            }
        })
    },
    sign:(data)=>{
        return api({
            url:"/task/v2/sign",
            method:"POST",
            body:data
        })
    }

}